package com.ericom.dao.hibernate;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.ericom.dao.StockDao;
import com.ericom.model.Stock;

@Repository("stockDao")
public class StockDaoHibernate extends GenericDaoHibernate<Stock, Long> implements
		StockDao {

	public StockDaoHibernate(){
		super(Stock.class);
	}

	public List<Stock> findStockByProduct(Long productId) {
		
		return this.getHibernateTemplate().find("from Stock where productId=?",productId);
	}

}
